package br.com.ep.generico.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.MailSender;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.stereotype.Service;

@Service
public class EmailSender {

	@Autowired
	public MailSender mailSender;
	 
	
 
	public void sendSimpleMail(String emailDestino, String assuntoEmail, String mensagem) {
 
		SimpleMailMessage eMail = new SimpleMailMessage();
 
		eMail.setTo(emailDestino);
		eMail.setSubject(assuntoEmail);
		eMail.setText(mensagem);
		mailSender.send(eMail);	
	}
}
